/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2014, INDIAN INSTITUTE OF TECHNOLOGY, MADRAS 
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: Poornima Kalyan Sundaram <poornimaks93@gmail.com>
 */
#ifndef WEIGHTED_FAIR_QUEUE_H
#define WEIGHTED_FAIR_QUEUE_H
#include "ns3/boolean.h"
#include "ns3/net-device-container.h"
#include "ns3/type-id.h"
#include "ns3/object-factory.h"
#include "ns3/node-container.h"
#include "wifi-mac-header.h"
#include <map>
#include<utility>
#include "ns3/traced-callback.h"
#include "ns3/enum.h"

namespace ns3 {
class WeightedFairQueue: public Object {

public:

static TypeId GetTypeId (void);
WeightedFairQueue ();
~WeightedFairQueue ();
enum mode{SOURCE,DESTINATION,SOURCEDESTINATION};
mode m_mode;
void SetMode (mode mode1);
void Set(std::string name,std::string val);
void Install(NodeContainer d);
void SetWeights(Ipv4Address address,double weights);
void SetWeights(Ipv4Address src_address,Ipv4Address dest_addresss,double weights);
uint16_t m_maxFlows;
std::map<std::pair<Ipv4Address,Ipv4Address>,double> m_weightsTable;
std::map<std::pair<Ipv4Address,Ipv4Address>,double>::iterator It;
NodeContainer m_nodes;
};

} // namespace ns3

#endif /* WEIGHTED_FAIR_QUEUE_H */
